import axios from 'axios'

const client = axios.create({
  baseURL: '/api',
  timeout: 30000,
  withCredentials: true,
})


// 请求拦截
client.interceptors.request.use(config => {
  return config
}, err => {
  return Promise.reject(err)
})

// 相应拦截
client.interceptors.response.use(response => {
  return response
}, err => {
  return Promise.reject(err)
})

export default client